//
//  UIButton+Extension.swift
//  LEOweibo
//
//  Created by zz on 16/2/22.
//  Copyright © 2016年 zz. All rights reserved.
//

import UIKit


extension UIButton {
    convenience init(imageName: String, backImageName: String) {
        self.init()
        setImage(UIImage(named: imageName), forState: .Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState: .Highlighted)
        setBackgroundImage(UIImage(named: backImageName), forState: .Normal)
        setBackgroundImage(UIImage(named: backImageName + "_highlighted"), forState: .Highlighted)
        sizeToFit()
    }
}
